package com.pucong.gitee.database.backup.common.entity.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pucong.gitee.database.backup.common.selfenum.UserStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
* @author pucong
* @company gitee.com/pucong
* @create 2020-12-01
*/
@Data
@TableName("sys_user")
@ApiModel("用户基础信息")
public class SysUserInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "uuid",type = IdType.INPUT)
    @ApiModelProperty("主键")
    private String uuid;

    @NotBlank(message = "账号不能为空")
    @TableField("login_name")
    @ApiModelProperty("账号")
    private String loginName;

    @NotBlank(message = "密码不能为空")
    @TableField("password")
    @ApiModelProperty("密码")
    private String password;

    @NotBlank(message = "姓名不能为空")
    @TableField("user_name")
    @ApiModelProperty("姓名")
    private String userName;

    @NotNull(message = "状态不能为空")
    @TableField("status")
    @ApiModelProperty("状态")
    private UserStatusEnum status;

    @TableField("LAST_LOGIN_TIME")
    @ApiModelProperty("上次登录时间")
    private Date lastLoginTime;

    @TableField("create_time")
    @ApiModelProperty("创建日期")
    private Date createTime;

    @TableField("create_by")
    @ApiModelProperty("创建人id")
    private String createBy;

    @TableField("create_by_path")
    @ApiModelProperty("创建人id path")
    private String createByPath;

    @TableField("user_setting")
    @ApiModelProperty("用户个性化设置，皮肤、布局")
    private String userSetting;

    @TableField(exist = false)
    @ApiModelProperty("创建人")
    private String createByName;
}
